#include <stdio.h>
#include <malloc.h>
#include "oes.h"

int main() {
    int res;
    int puchNameLen, puchCompanyLen, puchVersionLen;
    unsigned char *puchName = NULL;
    unsigned char *puchCompany = NULL;
    unsigned char *puchVersion = NULL;
    res = OES_GetProviderInfo(puchName, &puchNameLen, puchCompany, &puchCompanyLen, puchVersion, &puchVersionLen, NULL,
                              NULL);
    printf(">> Call OES_GetProviderInfo ret: 0x%08x\n", res);
    printf(">> Size [puchName, puchCompany, puchVersion]: [%d, %d, %d]\n", puchNameLen, puchCompanyLen, puchVersionLen);

    puchName = (unsigned char *) calloc(sizeof(unsigned char), puchNameLen);
    puchCompany = (unsigned char *) calloc(sizeof(unsigned char), puchCompanyLen);
    puchVersion = (unsigned char *) calloc(sizeof(unsigned char), puchVersionLen);
    res = OES_GetProviderInfo(puchName, &puchNameLen, puchCompany, &puchCompanyLen, puchVersion, &puchVersionLen, NULL,
                              NULL);
    printf(">> [0x%08x] Content [puchName, puchCompany, puchVersion]: [%s, %s, %s]\n", res, puchName, puchCompany,
           puchVersion);

    free(puchName);
    free(puchCompany);
    free(puchVersion);

    return 0;
}
